package com.zzuli.dcxt.controller;

import com.zzuli.dcxt.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/user")
public class UsersController {
    @Autowired
    private LoginService loginService;
    @RequestMapping("/list")
    public String throughUser(Model model){
    List list=loginService.getListUser();
    model.addAttribute("list",list);
    return "user";
    }
}
